<template>
  <div>
    <el-main>
      <el-row type="flex" justify="center">
        <el-col :span="18">
          <el-carousel :interval="4000" type="card" height="200px">
            <el-carousel-item v-for="item in 3" :key="item">
              <h3>{{ item }}</h3>
            </el-carousel-item>
          </el-carousel> 
        </el-col>
      </el-row>

      <el-row type="flex" justify="center" v-for="o in 4" :key="o" class="news-item">
        <el-col :span="16">
          <el-card :body-style="{ padding: '0px' }">
            <img src="../../static/logo_3.jpg" width="100%" height="180px" class="image">
            <div style="padding: 14px;">
              <span>这里是标题</span>
              <div class="bottom clearfix">
                <time class="time">{{ currentDate }}</time>
                <el-button type="text" class="button">查看全文</el-button>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </el-main>

  </div>
</template>

<script>
export default {
  data() {
    return {
      currentDate: new Date().toLocaleString()
    };
  }
}
</script>

<style>
  .el-main{
    padding-top: 80px;
  }
  .news-item{
    margin:20px auto;
  }
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }
  
  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }

    .time {
    font-size: 13px;
    color: #999;
  }
  
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }

  .button {
    padding: 0;
    float: right;
  }

  .image {
    width: 100%;
    display: block;
  }

  .clearfix:before,
  .clearfix:after {
      display: table;
      content: "";
  }
  
  .clearfix:after {
      clear: both
  }
</style>
